package com.io;

import java.io.FileInputStream;

public class InputStream_s1 {
  public static void main(String[] args) {
    FileInputStream fis = null;
    try {
      fis = new FileInputStream("/Users/edz/Desktop/BY2151-zmq/src/main/java/文稿/test.txt");
      StringBuilder S = new StringBuilder();
      int temp;
      while ((temp = fis.read()) != -1){
        S.append((char) temp);
      }
      System.out.println(S.toString());
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      try {
        if (fis != null) {
          fis.close();
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
}
